package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.entity.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper extends BaseMapper<Users> {

    /**
     * 获取用户角色
     * @param userId
     * @return
     */
    @Select("select user_type from users where user_id = #{userId}")
    Long getUserType(Integer userId);
}